<%#
name: Subscription - General Report
snippet: false
template_inputs:
- name: Subscriptions filter
  required: false
  input_type: user
  description: Search query to filter subscription entitlements. E.g. `quantity >
    0` to exclude subscriptions with unlimited entitlements. Keep unset for all subscriptions.
  advanced: false
model: ReportTemplate
require:
- plugin: katello
￼ version: 3.16.0
-%>
<%- report_headers 'ID', 'Name', 'Available', 'Quantity', 'SKU', 'Contract number' -%>
<%- load_pools(search: input('Subscriptions filter'), includes: [:subscription, :products, :organization]).each_record do |pool| -%>
<%-   report_row(
        'ID': pool.id,
        'Name': pool.name,
        'Available': pool.available,
        'Quantity': pool.quantity,
        'SKU': pool.product_id,
        'Contract number': pool.contract_number,
        'Account number': pool.account_number,
        'Start date': pool.start_date,
        'End date': pool.end_date,
        'Organization': pool.organization.name
      ) -%>
<%- end -%>
<%= report_render -%>
